package recursion;

public class Factorial {
    public static void main(String[] args) {
        int s =sum(5);
        System.out.println(s);
        int a = show(100);
        System.out.println(a);
    }

    private static int show(int n) {
        if(n==1) {
            return 1;
        } else {
            return n+show(n-1);
        }
    }

    private static int sum(int a) {
        if(a==1) {
            return 1;
        } else {
            return a*sum(a-1);
        }
    }
}
